﻿using System.Windows.Input;
using Aeon.Emulator;

namespace Aeon.Presentation
{
    /// <summary>
    /// Contains extension methods for the System.Windows.Input.MouseButton type.
    /// </summary>
    public static class MouseButtonExtensions
    {
        #region Public Static Methods
        /// <summary>
        /// Returns an Aeon.Emulator.MouseButtons value from a System.Windows.Input.MouseButton value.
        /// </summary>
        /// <param name="mouseButton">System.Windows.Input.MouseButton value to convert.</param>
        /// <returns>Aeon.Emulator.MouseButtons value.</returns>
        public static MouseButtons ToEmulatorButtons(this MouseButton mouseButton)
        {
            switch(mouseButton)
            {
            case MouseButton.Left:
                return MouseButtons.Left;

            case MouseButton.Middle:
                return MouseButtons.Middle;

            case MouseButton.Right:
                return MouseButtons.Right;

            default:
                return MouseButtons.None;
            }
        }
        #endregion
    }
}
